#pragma once

namespace Huffman {

	class Node
	{
	public:
		Node(void);
		Node(int sybmol, int weight, int order);
		~Node(void);

		Node* getLeft() const;
		void setLeft(Node* n);

		Node* getRight() const;
		void setRight(Node* n);

		Node* getParent() const;
		void setParent(Node* n);

		int getWeight() const;
		void setWeight(int weight);

		int getSymbol() const;
		void setSymbol(int symbol);

		int getOrder() const;
		void setOrder(int order);

		int getId() const;
		void setId(int id);

		int getParity() const;
		void setParity(int parity);

		Node* getNext() const;
		void setNext(Node* n);

		Node* getPrev() const;
		void setPrev(Node* n);

		bool isLeaf();

	private:
		Node* left;
		Node* right;
		Node* parent;

		Node* prev;
		Node* next;
		
		int order;
		int weight;
		int symbol;
		int parity;
		int id;
	};
}
